---
title: ElevatedButton
description: ElevatedButton API.
---

import CodeSnippetMD from '/src/components/CodeSnippetMD.astro';
import SlintProperty from '/src/components/SlintProperty.astro';

<CodeSnippetMD imagePath="/src/assets/generated/elevatedbutton.png" scale="3" imageWidth="300" imageHeight="200" imageAlt="">
```slint
import { ElevatedButton } from "@material";
export component Example inherits Window {
    width: 200px;
    height: 100px;
    background: transparent;
    ElevatedButton {
        text: "Click me";
        width: 120px;
        height: 40px;
    }
}
```
</CodeSnippetMD>

An `ElevatedButton` is a button with a subtle elevation that appears to float above the surface. It's used for primary actions that need to stand out from the background.

## Properties

### enabled
<SlintProperty propName="enabled" typeName="bool" defaultValue="true">
Whether the button is enabled and can be interacted with.
</SlintProperty>

### icon
<SlintProperty propName="icon" typeName="image">
An optional icon displayed on the button.
</SlintProperty>

### text
<SlintProperty propName="text" typeName="string">
The text label displayed on the button.
</SlintProperty>

### tooltip
<SlintProperty propName="tooltip" typeName="string">
A tooltip text that appears when hovering over the button.
</SlintProperty>

## Callbacks

### clicked()
Invoked when the button is clicked.
